<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style type="text/css">
        /*link visited hover active*/
        a:link{
            color: red;
            background-color: ghostwhite;
        }
        a:visited{
            color: ghostwhite;
            background-color: black;
        }
        a:hover{
            color: darkblue;
            background-color: yellow;
        }
        a:active{
            color: green;
            background-color: khaki;
        }
    </style>
</head>
<body>
     <a href="#">这是一个链接</a>
</body>
</html>